---
title: License
---

## Overview

The complete Univer advanced features require a license to be fully functional. You can activate the paid plan by adding a license to your project, or you can upgrade to a higher plan by updating your license. This page will guide you on how to obtain, configure, and verify your license.

## Prerequisites

Before you begin, please ensure that you:
- Integrated Univer advanced features into your project. If you haven't completed the integration, please refer to [Integrating Univer Advanced Features](/guides/pro).
- For server-side deployment, you have completed the configuration of Docker or Kubernetes environment. If you haven't completed the configuration, please refer to the [Docker Deployment Documentation](/guides/pro/deploy#deploy-to-docker-compose) or [Kubernetes Deployment Documentation](/guides/pro/deploy#deploy-to-k8s).
- Have a valid license. If you don't have one yet, you can obtain it by registering on the [License Page](https://univer.ai/license).

## Download License

1. Visit the [License Page](https://univer.ai/license) and log in to your account

2. Download the license file
![Download License](./license/new-02-en.png)

### Free Trial License

If you don't have a license yet or are unsure about purchasing one, we offer a 30-day trial license for you to fully experience all the advanced features of Univer.

1. Visit the [License Page](https://univer.ai/license) and log

2. Click the "Get Trial License" button
![Get License](./license/new-01-en.png)

## Add or Update License

Unzip the downloaded license file `license-univer.zip`, and you will obtain `license.txt` and `licenseKey.txt` files. Please keep these two files safe and ensure that you do not modify their format and content.

### Use License in Client

#### In Preset Mode

```typescript
import { UniverSheetsAdvancedPreset } from '@univerjs/preset-sheets-advanced'

const { univerAPI } = createUniver({
  presets: [
    UniverSheetsAdvancedPreset({
      license: `Paste the content from your license.txt here`,
    }),
  ],
})
```

#### In Plugin Mode

First, you need to install the `@univerjs-pro/license` plugin:

```package-install
npm install @univerjs-pro/license
```

Then, register the `UniverLicensePlugin`. Make sure this plugin is registered immediately after the Univer instance is created. Paste the content from your `license.txt` into the `license` parameter of the plugin.

```typescript
import { UniverLicensePlugin } from '@univerjs-pro/license'

univer.registerPlugin(UniverLicensePlugin, {
  license: `Paste the content from your license.txt here`,
})
```

### Use License in Server

<Tabs items={['docker compose', 'K8s']}>
  <Tab>
    1. Copy the `license.txt` and `licenseKey.txt` files to the `/univer-server/configs/` directory.
    2. Run the service script `bash run.sh` in the univer-server directory to restart the universer service.
  </Tab>
  <Tab>
    1. Execute the following command

    ```bash
    helm upgrade --install -n univer --create-namespace \
    --set global.istioNamespace="univer" \
    --set-file universer.license.licenseV2=$(YOUR_LICENSE_TXT_PATH) \
    --set-file universer.license.licenseKeyV2=$(YOUR_LICENSE_KEY_TXT_PATH) \
    univer-stack oci://univer-acr-registry.cn-shenzhen.cr.aliyuncs.com/helm-charts/univer-stack
    ```
  </Tab>
</Tabs>

## Verify License

### Verify License in JavaScript/TypeScript Project

1. After injecting the license into the frontend, start the project to verify whether the license is valid and correctly used.
Note: If the license is not entered or the entered license is invalid (e.g., expired or incorrect content), some features will be restricted, and a watermark will be displayed on the page.
![Frontend License Verification Failed](./license/new-06.png)

2. When a valid license is entered, the project will run normally without any restrictions.
![Frontend License Verification Successful](./license/new-07.png)

### Verify License in Univer Server

Access `host:8000/universer-api/license/key` to view the license entitlement information. For example, if your service is running locally, visit `http://localhost:8000/universer-api/license/key`.

```json
{
  "verify": "true", // License verification result
  "release_type": "COMMERCIAL" // License type
}
```

![Backend License Verification](./license/new-05.png)

## Common Issues

1. If the license verification fails, please check:
    - Whether the license file is complete and has not been modified
    - Whether the license has expired
    - Whether the service has been restarted correctly
2. If you encounter other issues, please contact our technical support
